<template>
    <view class="con" :style="{height: height+'px'}">
        <image :src="img" mode="widthFix"></image>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                height: 0,
                img: '',
            }
        },
        onLoad() {
            const query = uni.createSelectorQuery();
            query.in(this).select('.con').boundingClientRect();
            query.exec((res) => {
                this.height = uni.getSystemInfoSync().windowHeight;
            })
            this._getMyinvite();
        },
        methods: {
            _getMyinvite() {
                uni.showLoading({
                    title: '加载中'
                });
                this.$u.api.getMyinvite().then(res => {
                    this.img = res.img;
                    uni.hideLoading();
                })
            },
        }
    }
</script>

<style lang="scss" scoped>
    .con {
        height: 100%;
        width: 100%;
        overflow: hidden;
        background-color: #ffffff;
        display: flex;
        // align-items: center;
        justify-content: center;
        
        image {
            margin-top: 100rpx;
            width: 90%;
        }
    }
</style>
